package service.impl;

import POJO.Books;
import mapper.BooksMapper;
import org.springframework.stereotype.Service;
import service.BooksService;

import javax.annotation.Resource;
import java.util.List;


@Service("booksService")
public class BooksServiceImpl implements BooksService {

    @Resource
    private BooksMapper booksMapper;

    @Override
    public List<Books> selAll(Integer a,String b, int currPageNo, int pageSize) {
         return booksMapper.selAll(a,b,currPageNo,pageSize);
    }

    @Override
    public int add(Books book) {
        return booksMapper.add(book);
    }

    @Override
    public int count(Integer a,String b) {
        int count=booksMapper.count(a,b);
        return count;
    }

    @Override
    public Books selbyId(Integer bookId) {
        return booksMapper.selbyId(bookId);
    }

    @Override
    public int updateById(Books books) {
        return booksMapper.updateById(books);
    }

    @Override
    public int delectById(Books books) {
        return booksMapper.delectById(books);
    }
}
